// 获取多个认证资料
export default {
  namespaced: true,
  state: {
    // 当前登录站点信息
<<<<<<< HEAD
    identityAuthenticationForm: null,
	// 当前上传进度
	submitStatus:JSON.parse(uni.getStorageSync('submitStatus') || '{}'),
=======
    identityAuthenticationForm: JSON.parse(uni.getStorageSync('identityAuthenticationForm') || '{}'),
	// 设置用户头像
	uploadAvatarForm: JSON.parse(uni.getStorageSync('uploadAvatarForm') || '{}'),
	// 上传健康证
	uploadHealthCertificateForm: JSON.parse(uni.getStorageSync('uploadHealthCertificateForm') || '{}'),
	// 上传资质
	uploadQualificationForm:JSON.parse(uni.getStorageSync('uploadQualificationForm') || '{}'),
	 // 基本认证资料
	basicAuthenticationForm:JSON.parse(uni.getStorageSync('basicAuthenticationForm') || '{}'),
	// 当前上传进度
	submitStatus:JSON.parse(uni.getStorageSync('submitStatus') || '{}'),
	
	// 任务中心的上传
	taskCenter:JSON.parse(uni.getStorageSync('taskCenter') || '{}'),
	// 技师详情
	technicianDetails:JSON.parse(uni.getStorageSync('technicianDetails') || '{}'),
	// 获取授权信息
	authorizationInformation:JSON.parse(uni.getStorageSync('authorizationInformation') || '{}'),
>>>>>>> 52b948355e151c415e9c82e94b1b31e76c5ad35e
  },
  mutations: {
    // 设置登录用户的信息
    identityAuthentication(state, info) {
		console.log(info)
      state.identityAuthenticationForm = info;
<<<<<<< HEAD
    },
=======
	   uni.setStorageSync('identityAuthenticationForm', JSON.stringify(state.identityAuthenticationForm))
    },
	// 设置用户头像
	uploadAvatar(state,info){
		state.uploadAvatarForm = info;
		 uni.setStorageSync('uploadAvatarForm', JSON.stringify(state.uploadAvatarForm))
	},
	// 上传健康证	
	uploadHealthCertificate(state,info){
		state.uploadHealthCertificateForm = info;
		 uni.setStorageSync('uploadHealthCertificateForm', JSON.stringify(state.uploadHealthCertificateForm))
	},
	// 上传资质
	uploadQualification(state,info){
		state.uploadQualificationForm = info;
		 uni.setStorageSync('uploadQualificationForm', JSON.stringify(state.uploadQualificationForm))
	},
	// 基本资料
	basicAuthentication(state,info){
		console.log(info)
		state.basicAuthenticationForm = info;
		 uni.setStorageSync('basicAuthenticationForm', JSON.stringify(state.basicAuthenticationForm))
	},
>>>>>>> 52b948355e151c415e9c82e94b1b31e76c5ad35e
	// 上传进度
	uploadProgress(state,statusObj){
		 state.submitStatus=statusObj
		 uni.setStorageSync('submitStatus', JSON.stringify(state.submitStatus))
<<<<<<< HEAD
	}
=======
	},
	// 任务中心上传
	uploadTaskCenter(state,statusObj){
		 state.taskCenter=statusObj 
		  uni.setStorageSync('taskCenter', JSON.stringify(state.taskCenter))
	},
	// 技师详情
	technicianDetailsFn(state,statusObj){
		state.technicianDetails=statusObj
		 uni.setStorageSync('technicianDetails', JSON.stringify(state.technicianDetails))
	},
	// 获取到授权的员工信息
	authorizationInformationFn(state,statusObj){
		state.authorizationInformation=statusObj
		 uni.setStorageSync('authorizationInformation', JSON.stringify(state.authorizationInformation))
	}
	
>>>>>>> 52b948355e151c415e9c82e94b1b31e76c5ad35e
  },
  actions: {
    /**
     * 请求用户信息、权限、角色、菜单
     */
    // async fetchSiteInfo({ commit }) {
    //   const result = await getSiteDomainName({
    //     siteDomainName: 'test.smam.com'
    //   }).catch(() => {});

    //   if (!result) {
    //     return {};
    //   }
    //   // 用户信息
    //   commit('siteInfo', result);
    // }
<<<<<<< HEAD
  },
  // 模块的 getters 属性
  getters: {
  
    addstr(state) {
     
      return state.submitStatus
    }
  },
  
=======
	
  },
  getters: {
    addstr(state) {
      return state.submitStatus
    },
	taskCenter(state){
		 return state.taskCenter
	},
	technicianDetails(state){
		return state.technicianDetails
	},
	// 获取授权的信息
	authorizationInformation(state){
		return state.authorizationInformation
	}
  },
>>>>>>> 52b948355e151c415e9c82e94b1b31e76c5ad35e
};
